<!DOCTYPE html>
<html>
<head>
<title>违法信息录入</title>
<meta http-equiv="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit">
<%include("/common/include.html"){}%>
<script src="${cxt !}/sb/js/fineRegistration/fineRegistration.js"
	type="text/javascript" charset="utf-8"></script>
<style type="text/css">
			#customInfo li{
				display: inline-block;
				width: 165px;
				height: 30px;
				position: relative;
				margin-top: 5px;
			}
			#customInfo li div{
				position: absolute;
				right: 0px;
			}
			input {
				border: 1px solid black;
			}
			
			.table td {
				padding: 5px;
			}
			.name{
			
			background: #bad0ff;
			}
		</style>
</head>
<body>

	<div class="easyui-layout" style="width: 100%; height: 100%;">
		<form id="info_form">
			<%include("/commonUtil/ddcSearchVehicle.html"){}%> <br />

			<table class="table" width="100%" align="center"  border="1">
				<tr align="left"  height="30">
					<td width="10%" align="center" class="name"><b>车辆类型</b></td>
					<td width="23%" align="left">
					<input id="vid" name="fineRegistration.vid"  type="hidden"  value="${vehicle.id !}">
					<input  id="CLLX" name="fineRegistration.CLLX" style="width: 80%" value="${vehicle.cllx !}" readonly="readonly"/>
						<!-- <select id="CLLX" name="fineRegistration.DDC_CLLX" style="width: 80%;" disabled="disabled">
							<option value="-1">--请选择--</option>
							<option value="电动自行车">电动自行车</option>
							<option value="电动两轮车">电动两轮车</option>
							<option value="电动轮椅车">电动轮椅车</option>
							<option value="电动三轮车">电动三轮车</option>
							<option value="小型低速电动汽车">小型低速电动汽车</option>
						</select> -->
						<!-- <input class="easyui-combobox" style="width:80%;height:20px;"  id="CLLX" name="fineRegistration.CLLX" 
							data-options="
							url:'${cxt!}/commonUtil/getVehicleInfo',
							method:'post',
							valueField:'cllx',
							textField:'cllx'
							"> -->
					</td>
					<td class="name" width="10%" align="center"><b>违法时间</b></td>
					<td width="23%" align="left"><input
						name="fineRegistration.INFRACTIONDATE"
						class="easyui-datetimebox inputBox theme-textbox-radius date"
						style="  width: 200px; height: 20px;" />
					</td>
					<td class="name" width="10%" align="center"><b>违法地点</b></td>
					<td width="23%" align="left">
					<select  name="fineRegistration.INFRACTIONPLACE"
						style="  width: 80%" >
      	<option>城区</option>
      	<option>矿区</option>
      	<option>新荣区</option>
      	<option>南郊区</option>
      	<option>市辖区</option>
      	<option>大同县</option>
      	<option>阳高县</option>
      	<option>天镇县</option>
      	<option>广灵县</option>
      	<option>灵丘县</option>
      	<option>浑源县</option>
      	<option>左云县</option>
      </select>
					
					<!-- <input
						name="fineRegistration.DDC_INFRACTION_PLACE"
						style="  width: 80%" value=""/> -->
						
						
						</td>
				</tr>
				
				<tr align="left"   height="30">
					<td class="name" width="10%" align="center"><b>违法代码</b></td>
					<td width="23%" align="left">
						<input class="easyui-combobox" style="width:80%;height:20px;"  id="wfdm" name="fineRegistration.PUNISHMENTDM"
							data-options="
							url:'penalties/getPenalties',
							method:'post',
							valueField:'code',
							textField:'codecontent'
							">
					</td>
					<td class="name" width="10%" align="center"><b>罚款金额</b></td>
					<td width="23%" align="left"><input id="money"
						name="fineRegistration.PUMONEY"
						style="  width: 80%" readonly="readonly"/></td>
					<td class="name" width="10%" align="center"><b>缴纳状态</b></td>
					<td width="23%" align="left"><select
						name="fineRegistration.PUMONEYSTATUS" style="width: 80%;">
							<option value="已缴纳">已缴纳</option>
							<option value="未缴纳">未缴纳</option>
					</select></td>
				</tr>
				
				<tr align="left"   height="30">
					<td class="name" width="10%" align="center"><b>违法详情</b></td>
					<td colspan="5" align="left" width="92%"><input
						name="fineRegistration.PUDETAILS" style="width: 80%;" /></td>
				</tr>
				
				<tr align="left"   height="30">
					<td class="name" width="10%" align="center"><b>被处罚人</b></td>
					<td width="23%" align="left"><input id="SYR"
						name="fineRegistration.PUNISHMENT"
						style="  width: 80%" /></td>
					<td class="name" width="10%" align="center"><b>联系方式</b></td>
					<td width="23%" align="left"><input id="LXDH"
						name="fineRegistration.PUNISHMENTCONTACT"
						style="  width: 80%" /></td>
					<td class="name" width="10%" align="center"><b>交通警察</b></td>
					<td width="23%" align="left"><input
						name="fineRegistration.FINEPOLICE" style="width: 80%;" /></td>
				</tr>

				<tr align="left"   height="30">
					<td class="name" width="10%" align="center"><b>行政强制措施</b></td>
					<td colspan="5" align="left"  width="92%">&nbsp;
						<input type="text" hidden="hidden" id="QZCS" name="fineRegistration.QZCS" value=""/>
						<input type="checkbox" value="扣留电动车" name="QZCS1">扣留电动车&nbsp;
						<input type="checkbox" value="扣留电动车行驶证" name="QZCS1">扣留电动车行驶证&nbsp;
						<input type="checkbox" id="SJWP_BOX" value="收缴物品" name="QZCS1" onclick="box_readonly();">收缴物品
						<input name="fineRegistration.SJWP" id="SJWP_VALUE" style="width: 30%;" readonly="readonly"/>&nbsp;
						<input type="checkbox" id="JYSY" value="检验血样" class="QZCS1" name="QZCS1" onclick="box_disabled();">检验血样&nbsp;
						<input type="checkbox" id="JYNY" value="检验尿样" class="QZCS1" name="QZCS1" onclick="box_disabled();">检验尿样&nbsp;
						<input type="checkbox" value="拖移机动车" name="QZCS1">拖移机动车
						
						<!-- <input class="subject" data-options="label:'语文',value:'1'" name='subject[]'>
						<input class="subject" data-options="label:'数学',value:'2'" name='subject[]'>
						<input class="subject" data-options="label:'英语',value:'3'" name='subject[]'>
						<input class="subject" data-options="label:'科学',value:'4'" name='subject[]'>
						<input class="subject" data-options="label:'社会',value:'5'" name='subject[]'>
						<input class="subject" data-options="label:'地理',value:'6'" name='subject[]'> -->
						
					</td>
				</tr>
				
				<tr align="left"   height="30">
					<td class="name" width="10%" align="center"><b>备&nbsp;&nbsp;&nbsp;&nbsp;注</b></td>
					<td colspan="5" align="left"  width="92%"><input
						name="fineRegistration.PUNOTE" style="width: 80%;" /></td>
				</tr>
				
				<input type="hidden" name="fineRegistration.CREATEDATE" id="CREATE_TIME" style="width: 80%;" value=""/>
				<input type="hidden" name="fineRegistration.CREATER" style="width: 80%;" value="${user.name! }"/>
				<input type="hidden" name="fineRegistration.FINEPOLICEDEPARTMENT" style="width: 80%;" value="${user.departmentids! }" />
				<input type="hidden" name="fineRegistration.FINEORGANIZATION" style="width: 80%;" value="${user.organizationids! }" />

			</table>
			<br /> <br /> <a href="#" class="easyui-linkbutton"
				data-options="iconCls:'icon-ok'"
				style="margin-left: 45%; margin-bottom: 3px;" onclick="saveInfo()">登记</a>

		</form>
	</div>

</body>
</html>

<script type="text/javascript">

$(document).ready(function () {
	$("#wfdm").combobox({
		onChange: function (n,o) {
			var code = n.substring(0,4);
			if("2d01" == code||"2d02" == code||"2d03" == code||"2d04" == code||"2d05" == code||"2d06" == code||"2d07" == code||"2d08" == code){
				document.getElementById("money").value = 50;
			}else if("2d09" == code){
				document.getElementById("money").value = 30;
			}else if("2d10" == code||"2d11" == code||"2d12" == code){
				document.getElementById("money").value = 20;
			}else{
				document.getElementById("money").value = '';
			}
		} 
	})
});

function box_disabled(){
	
	var jysy = document.getElementsByClassName('QZCS1');  
    if(jysy[0].checked == true){
		jysy[1].disabled = "disabled";
	}else{
		jysy[1].disabled = "";
	}
    if(jysy[1].checked == true){
		jysy[0].disabled = "disabled";
	}else{
		jysy[0].disabled = "";
	}
}

function box_readonly(){
	var SJWP_BOX = document.getElementById('SJWP_BOX');  
	var SJWP_VALUE = document.getElementById('SJWP_VALUE');
    if(SJWP_BOX.checked == true){
    	SJWP_VALUE.removeAttribute("readOnly");
	}else{
		SJWP_VALUE.value = '';
		SJWP_VALUE.setAttribute("readOnly",true);
	}
}

function saveInfo(){
     var QZCS1 = $("input[name='QZCS1']:checked");  
     var QZCS_val = "";   
     QZCS1.each(function(){  
    	 QZCS_val += $(this).val()+",";  
     }) 
     $('#QZCS').val(QZCS_val);
     
     var date = new Date();
 	 var year = date.getFullYear();
 	 var month = date.getMonth()+1;
 	 var day = date.getDate();
 	 var hour = date.getHours();
 	 var minute = date.getMinutes();
 	 var second = date.getSeconds();
 	 /* alert(year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second); */
     $('#CREATE_TIME').val(year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second);
     
	 $.ajax({
	    cache: true,
	    type: "POST",
	    url:"${cxt !}/fineRegistration/saveInfo",
	    data:$('#info_form').serialize(),// 你的formid
	    dataType:'json',
	    async: false,
	    success: function(result) {
	    	if(result.msg =='保存成功'){
	    		$.slideMsg("保存成功", parent.$);
	    		location.reload();
	    	}else{
	    		 $.alert(parent.$, result.msg);
	    	}
	    	//loadDialog($("#mbtablediv"), null, '行车证', "${cxt!}/beingServed/getCustomerProduct?bw="+bw+"&cid="+id+"&sid="+sid+"&mima="+sf);
	    	
	    
	    }
	});
	 
	 
} 



</script>
